package com.ruoyi.labsafety.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.labsafety.mapper.LabSafetyCheckRelFileMapper;
import com.ruoyi.labsafety.domain.LabSafetyCheckRelFile;
import com.ruoyi.labsafety.service.ILabSafetyCheckRelFileService;

/**
 * 安全检查附件Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-30
 */
@Service
public class LabSafetyCheckRelFileServiceImpl implements ILabSafetyCheckRelFileService 
{
    @Autowired
    private LabSafetyCheckRelFileMapper labSafetyCheckRelFileMapper;

    /**
     * 查询安全检查附件
     * 
     * @param projectRelFileId 安全检查附件ID
     * @return 安全检查附件
     */
    @Override
    public LabSafetyCheckRelFile selectLabSafetyCheckRelFileById(Long projectRelFileId)
    {
        return labSafetyCheckRelFileMapper.selectLabSafetyCheckRelFileById(projectRelFileId);
    }

    /**
     * 查询安全检查附件列表
     * 
     * @param labSafetyCheckRelFile 安全检查附件
     * @return 安全检查附件
     */
    @Override
    public List<LabSafetyCheckRelFile> selectLabSafetyCheckRelFileList(LabSafetyCheckRelFile labSafetyCheckRelFile)
    {
        return labSafetyCheckRelFileMapper.selectLabSafetyCheckRelFileList(labSafetyCheckRelFile);
    }

    /**
     * 新增安全检查附件
     * 
     * @param labSafetyCheckRelFile 安全检查附件
     * @return 结果
     */
    @Override
    public int insertLabSafetyCheckRelFile(LabSafetyCheckRelFile labSafetyCheckRelFile)
    {
        return labSafetyCheckRelFileMapper.insertLabSafetyCheckRelFile(labSafetyCheckRelFile);
    }

    /**
     * 修改安全检查附件
     * 
     * @param labSafetyCheckRelFile 安全检查附件
     * @return 结果
     */
    @Override
    public int updateLabSafetyCheckRelFile(LabSafetyCheckRelFile labSafetyCheckRelFile)
    {
        return labSafetyCheckRelFileMapper.updateLabSafetyCheckRelFile(labSafetyCheckRelFile);
    }

    /**
     * 批量删除安全检查附件
     * 
     * @param projectRelFileIds 需要删除的安全检查附件ID
     * @return 结果
     */
    @Override
    public int deleteLabSafetyCheckRelFileByIds(Long[] projectRelFileIds)
    {
        return labSafetyCheckRelFileMapper.deleteLabSafetyCheckRelFileByIds(projectRelFileIds);
    }

    /**
     * 删除安全检查附件信息
     * 
     * @param projectRelFileId 安全检查附件ID
     * @return 结果
     */
    @Override
    public int deleteLabSafetyCheckRelFileById(Long projectRelFileId)
    {
        return labSafetyCheckRelFileMapper.deleteLabSafetyCheckRelFileById(projectRelFileId);
    }

    @Override
    public int deleteLabSafetyCheckRelFileByInstanceId(Long instanceId) {

        return labSafetyCheckRelFileMapper.deleteLabSafetyCheckRelFileByInstanceId(instanceId);
    }
}
